/**
 * 
 */
package edu.hadassah.store.employee;

import java.beans.PropertyChangeEvent;

import edu.hadassah.store.uniqueid.IUniqueId;

/**
 * @author persikov
 *
 */
public class StoreEmployee implements IEmployee {

	private final IUniqueId id;
	
	/**
	 * @param id
	 */
	public StoreEmployee(IUniqueId id) {
		super();
		this.id = id;
	}

	/**
	 * @return
	 * @see edu.hadassah.store.employee.IEmployee#getId()
	 */
	public IUniqueId getId() {
		return id;
	}

	/**
	 * @param evt
	 * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
	 */
	public void propertyChange(PropertyChangeEvent evt) {
		System.out.println("Employee [" + id + "] : \nOrder before change: " + 
				evt.getOldValue().toString() + "\nOrder after change: " + evt.getNewValue().toString());

	}

	/**
	 * Constructs a <code>String</code> with all attributes in name = value format.
	 *
	 * @return a <code>String</code> representation of this object.
	 */
	@Override
	public String toString()
	{
	    final String TAB = "    ";
	    
	    String retValue = "";
	    
	    retValue = "StoreEmployee ( "
	        + "id = " + this.id + TAB
	        + " )";
	
	    return retValue;
	}

}
